package gimys;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class GimysGame extends StateBasedGame {

	public static final int MENUSTATE 	  = 0;
	public static final int INTROSTATE	  = 1;
	public static final int GAMEPLAYSTATE = 2;
	public static final int ENDSTATE 	  = 3;
	
	public static final int displayHeight = 700;
	public static final int displayWidth  = 700;

	public static int startLevel  = 0;
	
	public GimysGame() throws SlickException {
		super("Give me Your Skin");
	}

	@Override
	public void initStatesList(GameContainer container) throws SlickException {
		this.addState(new MenuState(MENUSTATE));
		this.addState(new IntroState(INTROSTATE));
		this.addState(new GameplayState(GAMEPLAYSTATE));
		this.addState(new EndScreen(ENDSTATE));
		this.enterState(MENUSTATE);
	}

	public static void main(String[] args) throws SlickException {
		AppGameContainer agc = new AppGameContainer(new GimysGame());
		agc.setShowFPS(false);
		for (String arg : args ){
			System.out.println("args :"+arg);
			if( arg.equalsIgnoreCase("fps") ){
				agc.setShowFPS(true);
			}
			if( arg.startsWith("level") ){
				startLevel =  Integer.parseInt( arg.substring(5) )  ;
			}
			
		}
		agc.setDisplayMode(displayHeight, displayWidth, false);
		agc.start();
	}

}
